/*
 * @Author: Klein
 * @Date: 2021-06-17 11:24:53
 * @Description: file content
 */
const { Sequelize } = require("sequelize");

const { name, password, database, options } = require("../config/mysql");

const sequelize = new Sequelize(database, name, password, options);

sequelize
  .authenticate()
  .then(() => {
    console.log("#####数据库连接成功######");
  })
  .catch(() => {
    console.error("###数据库连接失败###", err);
  });

module.exports = sequelize;
